package com.ling.rocketmq.annotation;

import com.ling.rocketmq.configuration.RocketmqAutoConfiguration;
import com.ling.rocketmq.producer.RocketmqScannerConfigurer;
import com.ling.rocketmq.producer.RocketmqScannerRegistrar;
import com.ling.rocketmq.consumer.ConsumerProcessor;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.context.annotation.Import;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
@Import({ConsumerProcessor.class,
        RocketmqScannerRegistrar.class,
        RocketmqScannerConfigurer.class})
@ImportAutoConfiguration({RocketmqAutoConfiguration.class})
public @interface EnableRocketmq {

    String[] value() default {};

    String[] basePackages() default {};

    Class<?>[] basePackageClasses() default {};
}
